#ifndef __MV_CAMERA_TOOLS_H__
#define __MV_CAMERA_TOOLS_H__

#ifndef __cplusplus
#  error core.hpp header must be compiled as C++
#endif

#include <opencv2/opencv.hpp>

using namespace cv;

class MvCameraTools {
public:
	// 获取校正后的点
	int getCameraCalibrationPoint(Size imgSize, const float *curve, int curveSize, Point2f center, Point2f src,
			Point2f &dst);
	int getCameraCalibrationPoints(Size imgSize, const float *curve, int curveSize, Point2f center, InputArray src,
			OutputArray dps);

	// 根据传入的变形曲线数据校正图片，输出图片
	int cameraCalibration(Mat &src, const float *curve, int curveSize, Point2f center, OutputArray img);
	// 根据传入的校正后的点座标计算校正前的点座标
	int cameraInvCalibration(InputArray src, const float *curve, int curveSize, Point2f center, OutputArray pt);

	// 查找校准画布,输出4个角点
	int findCanvas(Mat &src, OutputArray pts);
	// 归一化大小（斜切，比例）,输出归一化图像
	int normalizedSize(Mat &src, InputArray pts, OutputArray o);
	// 生成最终映射点座标
	int makeFinalMapPoints(OutputArray o);
};

#endif
